home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Magazine / Online / QMail / source / wait_pid.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-15  |  283 b   |  14 lines

  1. #include <sys/types.h>
  2. #include <sys/wait.h>
  3. #include "error.h"
  4.  
  5. /* restriction: you must not care about any other child. */
  6. int wait_pid(wstat,pid) int *wstat; int pid;
  7. {
  8.   int r;
  9.   do
  10.     r = wait(wstat);
  11.   while ((r != pid) && ((r != -1) || (errno == error_intr)));
  12.   return r;
  13. }
  14.